<template>
	<view>
		<view style="width: 90%;text-align: right;margin-top: 10rpx;">
			<text>编辑</text>
		</view>
		<view class="list" v-for="(item,index) in orderList" :key = "index">
			<view class="checkbox">
					<u-checkbox-group class="checkbox" @change="checkboxGroupChange" shape="circle" active-color="#c6100e">
						<u-checkbox 
							@change="checkboxChange" 
							v-model="item.checked" 
							v-for="(item, index) in list" :key="index" 
							:name="item.name"
						>{{item.name}}</u-checkbox>
					</u-checkbox-group>
				</view>
				<view class="introduce">
					<view class="picture">
						<image src="../../../static/person.png" mode=""></image>
					</view>
					<view class="author">
						<view class="name">
							<text>{{item.name}}</text>
						</view>
						<view class="size">
							<text>{{item.size}}</text>
						</view>
						<view class="price">
							<text>¥{{item.price}}</text>
						</view>
						<view class="amount">
							<text>×{{item.amount}}</text>
						</view>
					</view>
			</view>
		</view>
		
		<!-- 底部模块 -->
		<view class="foot-bar">
			<view>
					<u-checkbox-group class="checkAll" @change="checkboxGroupChange" shape="circle" active-color="#c6100e">
						<u-checkbox 
							@change="checkboxChange" 
							v-model="item.checked" 
							v-for="(item, index) in list" :key="index" 
							:name="item.name"
						>{{item.name}}</u-checkbox>
					</u-checkbox-group>
					<text style="color: #999999;margin-left: -15rpx;">全选</text>
				</view>
				<view class="add">
					<text style="font-size: 24rpx;color: #999999;">合计<text style="color: #c6100e;font-weight: 700;font-size: 34rpx;">￥20008</text></text>
				</view>
				<view class="btn">
					<text>去结算</text>
				</view>
	</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
        isShow:false,
				orderList: [
					{
						name:'白启哲《春风细雨沐青峰》',
						size:'140*140',
						price:'20000',
						amount:'1'
					},
					{
						name:'白启哲《春风细雨沐青峰》',
						size:'140*140',
						price:'20000',
						amount:'1'
					},
					{
						name:'白启哲《春风细雨沐青峰》',
						size:'140*140',
						price:'20000',
						amount:'1'
					}
				],
				list: [
					{
						name: '',
						checked: false,
						disabled: false
					}
				],
			}
		},
		methods: {
			// 选中某个复选框时，由checkbox时触发
					checkboxChange(e) {
						//console.log(e);
					},
					// 选中任一checkbox时，由checkbox-group触发
					checkboxGroupChange(e) {
						// console.log(e);
					},
					// 全选
					checkedAll() {
						this.list.map(val => {
							val.checked = true;
						})
					},
					// 选中某个单选框时，由radio时触发
					radioChange(e) {
						// console.log(e);
					},
				 // 选中任一radio时，由radio-group触发
				  radioGroupChange(e) {
						// console.log(e);
				}
		}
	}
</script>

<style lang="scss" scoped>
	.checkbox {
		margin-top: 50rpx;
		margin-left: 15rpx;
	}
	
	.list {
		display: flex;
		position: relative;
		background-color: #fefffe;
		height: 240rpx;
		width: 94%;
		margin: 3%;
	}
	
	.introduce {
		display: flex;
		justify-content: space-between;
		width: 80%;
		margin-left: 2%;
		margin-top: -10rpx;
	}
	
	.introduce .people{
		width: 120rpx;
		height: 120rpx;
		border-radius: 50%;
	}
	
	.introduce .icon{
		width: 40rpx;
		height: 40rpx;
		margin-top: 40rpx;
	}
	.picture {
		width: 200rpx;
		height: 200rpx;
		margin-top: 30rpx;
	}
	
	.picture image {
		width: 200rpx;
		height: 200rpx;
	}
	
	.author {
		margin-top: 50rpx;
		margin-left: 20rpx;
		position: relative;
		width: 440rpx;
	}
	
	.author .size {
		color: #939393;
		font-size: 28rpx;
	}
	
	.author .amount {
		color: #939393;
		font-size: 28rpx;
    position: absolute;
		bottom: 20rpx;
		right: 20rpx;
	}
	
	.price {
		font-size: 28rpx;
		color: #d24745;
		font-weight: 700;
	}

	
	.checkmark-circle {
		position: absolute;
		bottom: 30rpx;
		left: 18rpx;
	}
	
	.foot-bar {
		display: flex;
		justify-content: space-between;
		position: fixed;
		bottom: 0;
		height: 188rpx;
	  background: #FEFFFE;
		width: 94%;
		margin: 3%;
	}
	
	.foot-bar .checkAll {
		margin-top: 60rpx;
		margin-left: 40rpx;
	}
	
	.foot-bar .add {
		margin-left: -180rpx;
		line-height: 140rpx;
	}
	
	.foot-bar .btn {
		width: 286rpx;
		height: 92rpx;
		background: #C6100E;
		border-radius: 46rpx;
		margin-left: -200rpx;
		text-align: center;
		line-height: 92rpx;
		color: #FFFFFF;
		margin-top: 20rpx;
		margin-right: 20rpx;
	}
</style>
